<template>
  <view class="package_sale" style="position: relative;" v-for="item in orderLists" :key="item.id"
    @click="navTo('Sale/order/fillOrdetail?id='+item.id)">
    <view class="fill">{{item.fill_status_text}}</view>
    <view class="center top">
      订单号：{{item.order_sn}}
      <image src="../../../static/saleIcon/icon/copy.svg" mode="" style="width:40rpx;height: 40rpx;"
        @click="copyText(item.order_sn)"></image>
    </view>
    <view class="space-between top">
      <view>{{item.product_name}}</view>
      <view>{{item.amount}}公斤</view>
    </view>
    <view class="space-between top">
      <view>{{item.price}}元/公斤</view>
      <view>消费金额￥{{item.money}}</view>
    </view>
    <view class="space-between top">
      <view style="color: #666;">{{item.createtime}}</view>
      <view>{{item.pay_type_text}}</view>
    </view>
  </view>
</template>

<script setup lang="ts">
  import { navTo } from '@/utils/navigator';
  import { copyText } from '@/utils/copyText';
  import { ref } from 'vue';
  const props = defineProps({
    orderLists: {
      type: Array
    },
  });
</script>

<style scoped lang="less">
  .fill {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 142rpx;
    height: 51rpx;
    background: #ECECEC;
    border-radius: 0px 0px 0px 10px;
    text-align: center;
    line-height: 51rpx;
    color: #666;
  }

  .top {
    margin-top: 5rpx;
  }
</style>